package com.qianyu.project.core.service;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.qianyu.project.core.bean.Form;

import javax.validation.constraints.NotNull;
import java.util.List;
import java.util.Map;


/**
 * @author gs
 * @date create in 2020/12/11 16:33
 */
public interface IFormService {
    /**
     * description: 保存审批单 <br/>
     * author: gs   <br/>
     * date: 2020/12/12 <br/>
     * params: [form] <br/>
     * return: java.lang.Integer
     */
    void save(Form form);

    /**
     * description: 依据源表提供源表主键 <br/>
     * author: gs   <br/>
     * date: 2020/12/12 <br/>
     * params: [target] <br/>
     * return: java.lang.String
     */
    String renderPrimaryKeyColumn(@NotNull String target);

    /**
     * description: 依据主键查询 <br/>
     * author: gs   <br/>
     * date: 2020/12/12 <br/>
     * params: [fid] <br/>
     * return: com.qianyu.flow.core.pojo.Form
     */
    Form getById(@NotNull Integer fid);

    /**
     * description: 依据流程号提供源表数据 <br/>
     * author: gs   <br/>
     * date: 2020/12/12 <br/>
     * params: [fid] <br/>
     * return: java.util.Map<java.lang.String,java.lang.Object>
     */
    Map<String,Object> renderTarget(@NotNull Integer fid);

    /**
     * description: 依据用户角色获取审批单 <br/>
     * author: gs   <br/>
     * date: 2020/12/12 <br/>
     * params: [eid] <br/>
     * return: java.util.List<com.qianyu.flow.core.pojo.Form>
     */
    List<Form> getByUserRole();

    /**
     * description: 依据用户获取审批单 <br/>
     * author: gs   <br/>
     * date: 2020/12/12 <br/>
     * params: [eid] <br/>
     * return: java.util.List<com.qianyu.flow.core.pojo.Form>
     */
    List<Form> getByUser();

    /**
     * description: 修改审批单 <br/>
     * author: gs   <br/>
     * date: 2020/12/12 <br/>
     * params: [form] <br/>
     * return: void
     */
    void update(Form form);

    /*
     * description: 查询当前登录人的待办事项 <br/>
     * author: mfy   <br/>
     * date:  <br/>
     * params:  <br/>
     * return:
     */
    IPage<Form> selectMybacklog(Map<String,String> params);

    List<Form> zhuyedeshenqing();

    /**
     * description: 根据id删除审批单 <br/>
     * author: gs   <br/>
     * date: 2021/1/27 <br/>
     * params: [fid] <br/>
     * return: void
     */
    void removeById(String fid);
}
